request-errors.js ➔ describe(ꞌrequest moduleꞌ)   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
nc 1
dl 0
loc 9
rs 9.6666
nop 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A request-errors.js ➔ ... ➔ it(ꞌshould reject if URI is not validꞌ) 0 3 1
A request-errors.js ➔ ... ➔ it(ꞌshould reject if ENOTFOUNDꞌ) 0 3 1
1
const unfurl = require('../index.js')
2
var chai = require('chai')
3
var expect = chai.expect
4
chai.use(require('chai-as-promised'))
5
6
describe('request module', function () {
7
  it('should reject if URI is not valid', function () {
8
    return expect(unfurl('123')).to.be.rejectedWith('Invalid URI')
9
  })
10
11
  it('should reject if ENOTFOUND', function () {
12
    return expect(unfurl('http://foo.bar')).to.be.rejectedWith('ENOTFOUND')
13
  })
14
})
15